package com.pan.api.config.impl;

import com.pan.api.config.ConfigUnit;
import com.pan.api.utils.PanApiDocXmlUtil;
import org.w3c.dom.Element;

public final class AuthorConfigUnit extends ConfigUnit<String> implements PanApiDocXmlUtil {
    public final static AuthorConfigUnit INSTANCE = new AuthorConfigUnit();

    private AuthorConfigUnit() {
    }

    @Override
    protected String createNewObjectInstance() {
        Element firstElement = findFirst("base", "author");
        return firstElement.getTextContent().strip();
    }

    public static void main(String[] args) {
        System.out.println(INSTANCE.get());
    }

}
